{
	template:`
	<a-page-header title="模块菜单">
            <a-row :gutter="16">
                <a-col :span="8">
		            <a-card :hoverable="true" :bodyStyle="{padding:'20px'}">
                        <a-divider orientation="left" style="margin:0;">模块</a-divider>
                        <a-row type="flex" v-for="item in lists[0]" style="padding-top:10px;">
                            <a-col flex="auto">
                                <m-icon :name="item.icoStyle" style="margin-right:8px;"></m-icon>{{item.oid}}
                                <a-typography-text v-if="oids[1]==item.oid" strong>{{item.name}}</a-typography-text>
                                <a-typography-link v-else @click="getMenuList(1,item.oid,item.name)">{{item.name}}</a-typography-link>
                            </a-col>
                            <a-col>
                                <a-button v-if="item.isInput=='Y'" type="text" size="small" @click="editModule(item.oid);"><m-icon name="icon-icon-6"></m-icon>修改</a-button>
                                <m-icon v-if="oids[1]==item.oid" name="icon-icon-62"></m-icon>
                            </a-col>
                        </a-row>
                        <a-row type="flex" style="padding-top:10px;">
                            <a-col flex="auto">
                                <a-divider style="margin:12px 0;" />
                            </a-col>
                            <a-col>
                                <a-button type="text" size="small" @click="editModule('')"><m-icon name="icon-icon-54"></m-icon>添加</a-button>
                            </a-col>
                        </a-row>
		            </a-card>
                </a-col>
                <a-col :span="8" v-if="oids[1]">
		            <a-card :hoverable="true" :bodyStyle="{padding:'20px'}">
                        <a-divider orientation="left" style="margin:0;">{{oids[1]}} {{names[1]}}</a-divider>
                        <a-row type="flex" v-for="item in lists[1]" style="padding-top:10px;">
                            <a-col flex="auto">
                                <m-icon :name="item.icoStyle" style="margin-right:8px;"></m-icon>{{item.oid}}
                                <a-typography-text v-if="oids[2]==item.oid" strong>{{item.name}}</a-typography-text>
                                <a-typography-link v-else @click="getMenuList(2,item.oid,item.name)">{{item.name}}</a-typography-link>
                            </a-col>
                            <a-col>
                                <a-button v-if="item.isInput=='Y'" type="text" size="small" @click="editMenu(1,item.oid,'');"><m-icon name="icon-icon-6"></m-icon>修改</a-button>
                                <m-icon v-if="oids[2]==item.oid" name="icon-icon-62"></m-icon>
                            </a-col>
                        </a-row>
                        <a-row type="flex" style="padding-top:10px;">
                            <a-col flex="auto">
                                <a-divider style="margin:12px 0;" />
                            </a-col>
                            <a-col>
                                <a-button type="text" size="small" @click="editMenu(1,'','')"><m-icon name="icon-icon-54"></m-icon>添加</a-button>
                            </a-col>
                        </a-row>
		            </a-card>
                </a-col>
                <a-col :span="8" v-if="oids[2]">
		            <a-card :hoverable="true" :bodyStyle="{padding:'20px'}">
                        <a-divider orientation="left" style="margin:0;">{{oids[2]}} {{names[2]}}</a-divider>
                        <a-row type="flex" v-for="item in lists[2]" style="padding-top:10px;">
                            <a-col flex="auto">
                                <m-icon :name="item.icoStyle" style="margin-right:8px;"></m-icon>{{item.oid}}
                                <a-typography-text>{{item.name}}</a-typography-text>
                            </a-col>
                            <a-col>
                                <a-button v-if="item.isInput=='Y'" type="text" size="small" @click="editMenu(2,item.oid,'');"><m-icon name="icon-icon-6"></m-icon>修改</a-button>
                            </a-col>
                        </a-row>
                        <a-row type="flex" style="padding-top:10px;">
                            <a-col flex="auto">
                                <a-divider style="margin:12px 0;" />
                            </a-col>
                            <a-col>
                                <a-button type="text" size="small" @click="editMenu(2,'',oids[2])"><m-icon name="icon-icon-54"></m-icon>添加</a-button>
                            </a-col>
                        </a-row>
		            </a-card>
                </a-col>
            </a-row>
	</a-page-header>
	`,
	props: ['localeZh','param','parentVue'],
	data:function(){
		return {
		    lists:[[],[],[]],
		    oids:['','',''],
		    names:['','',''],
		};
	},
	mounted(){
	    this.getModuleList();
	},
	methods:{
		getModuleList:function(){
			this.requestData('action/manage/module/getModuleList',
				{},
				data=>{
					if(!data.code){
						this.lists[0]=data.list;
					}else{
						this.$message.error(data.msg);
					}
				}
			);
		},
		getMenuList:function(i,oid,name){
		    this.oids[i]=oid;
		    this.names[i]=name;
		    if(i==1){
                this.oids[2]='';
                this.names[2]='';
		    }
			this.requestData('action/manage/module/getMenuList',
				{oid:oid},
				data=>{
					if(!data.code){
						this.lists[i]=data.list;
					}else{
						this.$message.error(data.msg);
					}
				}
			);
		},
		editModule:function(oid){
			this.openPage("action/manage/module/toEditModule",
				{module:{oid:oid}},
				function(flag,obj){
					if(flag){
						this.getModuleList();
					}
		        }.bind(this),
		        '900px'
	        );
		},
		editMenu:function(i,oid,parentOid){
			this.openPage("action/manage/module/toEditMenu",
				{menu:{oid:oid,parentMenu:{oid:parentOid},moduleInfo:{oid:this.oids[1]}}},
				function(flag,obj){
					if(flag){
						this.getMenuList(i,this.oids[i],this.names[i]);
					}
		        }.bind(this),
		        '900px'
	        );
		},
	}
}